This invention relates to image processing technologies generally and particularly to rendering technologies in a graphics system.
As computer technologies continue to advance rapidly, computer users demand improved image qualities, both in terms of image processing speed and image fidelity. However, the cost of producing truly interactive and realistic visual effects continues to remain prohibitively high. As a result, different image processing techniques and designs are being developed to attempt to accommodate both the user demand and the desirable low cost.
More specifically, some efforts have been focused on an improved rendering technique, which attempts to utilize smaller working memories than a traditional rendering technique. One such improved technique is bucket rendering. In a traditional rendering scheme, random access to frame buffer data and/or depth buffer for an entire screen is required. A frame buffer refers to a portion of memory reserved for holding the complete bit-mapped image sent to the screen, and a depth buffer (also referred to as Z buffer in some literatures) refers to a portion of memory reserved for holding the depth information of the bit-mapped image. In order to process the amount of information in such a bit-mapped image and still achieve some interactive visual effect, a graphics system employing the traditional rendering scheme often utilizes a simultaneously large and fast memory subsystem as its frame and depth buffers. Some examples of the fast memories are, but not limited to, Video Random Access Memory (VRAM) and Dynamical Random Access Memory (DRAM). More importantly, the data stored in such fast memory subsystem are considered to be externally visible, because graphics applications operating on the traditional graphics system can directly access to the data at will.
On the other hand, the bucket rendering method only requires random access to a single tile, or a portion of the entire screen. The required memory subsystem to store information from this single tile is most likely smaller, faster and less costly than the aforementioned memory subsystem of the traditional graphics system. Hence, instead of maintaining data in externally visible frame and/or depth buffers, one embodiment of a bucket rendering graphics system, which applies the described smaller memory subsystem above, maintains its data within the system.
Although such a bucket rendering graphics system may yield better performance at a lower cost than the traditional graphics system, the bucket rendering graphics system has limited support for some existing graphics applications and application programming interfaces (hereinafter APIs) that rely on the stored data which are externally visible. Throughout this disclosure, an xe2x80x9cexisting graphics applicationxe2x80x9d refers to a graphics application designed to function and execute correctly on any graphics system in existence prior to the existence of the described bucket rendering graphics system. The following example further illustrates the incompatibility problem. In particular, an existing graphics application may issue a request to lock the frame buffer and/or the depth buffer through an API, which has been designed to presume direct access to the frame buffer and/or the depth buffer. Since the described bucket rendering graphics system does not support externally visible frame buffers, the lock request fails and most likely causes errors in subsequent operations of the application. As has been demonstrated, the potential incompatibility between the existing graphics applications and the described bucket rendering graphics system will exist, unless these existing graphics applications are redesigned to somehow eliminate such lock operations, or the API is modified to accommodate a new architecture.
Additionally, even though the bucket rendering technique often offers performance improvement over a traditional rendering scheme, the reverse is true in situations where a graphics application chooses to rely on accessing the externally visible buffers. One such situation arises when multiple requests of the lock operation occur within a frame.
As has been demonstrated, in order to continue supporting existing graphics applications and to further improve the described bucket rendering technique, a method and apparatus is needed.
A method and apparatus of rendering an image is disclosed.
In one embodiment, a graphics system has a switch detector, which detects a switch condition in the graphics system. The graphics system also has a rendering block, which renders a plurality of layers according to the detected switch condition.